import request from '@/utils/request'

/****** 以下为 -- 案件登记 -- 案件办理 -- 案件处理 -- 案件处置-- 页面相关接口 ******/
// 查询曲江边界数据
export function getQJData() {
    return request({
        url: '/szcg/common/dict/getQjBjMapData',
        method: 'get'
    })
}
//对应行业类别特殊图层地图数据
export function getTypelv2MapData(query) {
    return request({
        url: '/business/event/event/industryTypelv2Layer',
        method: 'get',
        params:query
    })
}
/****** -- 案件登记 -- 页面相关接口 ******/
//是否开放景区
export function getkfjq() {
    return request({
        url: '/szcg/common/dict/selectSysDict/is_kfjq',
        method: 'get'
    })
}

// 获取是否延期数据
export function getisyq() {
    return request({
        url: '/szcg/common/dict/selectSysDict/is_yq',
        method: 'get'
    })
}

// 获取是否缓办数据
export function getishb() {
    return request({
        url: '/szcg/common/dict/selectSysDict/is_hb',
        method: 'get'
    })
}

//  获取是否突发事件数据
export function getistf() {
    return request({
        url: '/szcg/common/dict/selectSysDict/is_tf',
        method: 'get'
    })
}

//  获取是否紧急件数据
export function getisjj() {
    return request({
        url: '/szcg/common/dict/selectSysDict/is_jj',
        method: 'get'
    })
}

// 获取案件来源下拉数据
export function getCaseSource() {
    return request({
        url: '/szcg/common/dict/selectSysDict/szcg_archives_src',
        method: 'get'
    })
}

// 获取立案条件下拉数据
export function getCaseCondition(data) {
    return request({
        url: '/szcg/common/dict/eventTypelv3/' + data.id,
        method: 'get'
    })
}

// 根据立案条件查询责任主体、部门、一级行业、二级行业等信息
export function getOtherInfo(data) {
    return request({
        url: '/archives/archivesTypeLeve/getArchivesTypeLeveThreeById/' + data.id,
        method: 'get'
    })
}

// 提交登记信息
export function submitRegisterInfo(data) {
    return request({
        url: '/business/event/event/add',
        method: 'post',
        data: data
    })
}

// 编辑案件提交保存
export function editRegisterInfo(data) {
    return request({
        url: '/business/event/event/edit',
        method: 'put',
        data: data
    })
}

/****** -- 案件办理 -- 页面相关接口 ******/
//案件督办
export function eventOversee(data) {
    return request({
        url: '/business/event/eventOversee/eventOversee',
        method: 'post',
        data: data
    })
}


// 获取案件办理列表数据
export function getCaseHandleData(data) {
    return request({
        url: '/business/event/handle/list',
        method: 'post',
        data: data
    })
}

// 获取案件办理中案件可以转办的机构
export function getOrganization(data) {
    return request({
        url: '/business/event/handle/organization/' + data.eventId,
        method: 'get'
    })
}

// 获取案件办理中案件转办
export function handleshunt(data) {
    return request({
        url: '/business/event/handle/shunt',
        method: 'post',
        data: data
    })
}

//案件结案
export function handleover(data) {
    return request({
        url: '/business/event/handle/over',
        method: 'post',
        data: data
    })
}

// 案件销案
export function caseCancellation(data) {
    return request({
        url: '/business/event/handle/close',
        method: 'post',
        data: data
    })
}

// 其他方式结案结案原因
export function otherCloseData() {
    return request({
        url: '/szcg/common/dict/otherCloseCase',
        method: 'get'
    })
}

// 其他方式结案结案提交
export function otherCloseCase(data) {
    return request({
        url: '/business/event/handle/abnormalOver',
        method: 'post',
        data: data
    })
}

//案件挂起
export function saveEventPend(data) {
    return request({
        url: '/business/event/eventPend/saveEventPend',
        method: 'post',
        data: data
    })
}

//查询案件挂起原因
export function pendReason() {
    return request({
        url: '/szcg/common/dict/pendReason',
        method: 'get'
    })
}


/****** -- 案件处理 -- 页面相关接口 ******/
// 获取案件处理列表数据
export function geteventThreeList(data) {
    return request({
        url: '/szcg/business/eventThree/list',
        method: 'post',
        data: data
    })
}

//案件受理
export function eventThreeAccept(data) {
    return request({
        url: '/szcg/business/eventThree/accept',
        method: 'post',
        data: data
    })
}

//案件回退
export function updateDelFlagById(data) {
    return request({
        url: '/szcg/business/eventThree/updateDelFlagById',
        method: 'post',
        data: data
    })
}

//获取案件可以派遣的处置人员
export function eventThreeCzry(data) {
    return request({
        url: '/szcg/business/eventThree/czry',
        method: 'get',
        params: data
    })
}

//案件派遣
export function eventThreeSend(data) {
    return request({
        url: '/szcg/business/eventThree/send',
        method: 'post',
        data: data
    })
}

//处置机构审核
export function eventThreeExamine(data) {
    return request({
        url: '/szcg/business/eventThree/examine',
        method: 'post',
        data: data
    })
}


/****** -- 案件处置 -- 页面相关接口 ******/
//获取案件处置列表（监理）
export function getsuperviseList(data) {
    return request({
        url: '/business/event/supervise/list',
        method: 'post',
        data: data
    })
}

//监理审核
export function JLeventThreeExamine(data) {
    return request({
        url: '/business/event/supervise/examine',
        method: 'post',
        data: data
    })
}

//案件驳回
export function eventReject(data) {
    return request({
        url: '/business/event/supervise/reject',
        method: 'post',
        data: data
    })
}

//检测延期次数
export function checkDelay(data) {
    return request({
        url: '/business/event/eventApproval/checkDelay',
        method: 'get',
        params: data
    })
}

//案件延期
export function insertEventDelay(data) {
    return request({
        url: '/business/event/eventApproval/insertEventDelay',
        method: 'post',
        data: data
    })
}

//检测缓办次数
export function checkHb(data) {
    return request({
        url: '/business/event/eventApproval/checkHb',
        method: 'get',
        params: data
    })
}


//案件缓办
export function saveEventSlow(data) {
    return request({
        url: '/business/event/eventApproval/saveEventSlow',
        method: 'post',
        data: data
    })
}

// 通过二级行业类别获取所有标段机构公司边界
export function getAllBDJGBj(data) {
    return request({
        url: '/business/event/event/getMapByIndustryTypeLv2/' + data.id,
        method: 'get'
    })
}

// 通过标段机构编码和行业类别查找边界
export function getOnlyBDJGBj(data) {
    return request({
        url: '/szcg/business/eventThree/getMapByIndustryTypeLv2AndThreeCode',
        method: 'get',
        params: data
    })
}

// 导出案件PDF
export function exportCasePDF(data) {
    return request({
        url: '/business/event/event/exportPDF',
        method: 'post',
        data: data
    })
}

//  通过部门编码查询养护机构
export function getOrganizationId() {
    return request({
        url: '/szcg/common/dict/getOrganization',
        method: 'get'
    })
}

//  回退
export function getFallBack(data) {
    return request({
        url: '/eventDown/fallBack',
        method: 'get',
        params:data
    })
}

//  结案
export function getTestFinish(data) {
    return request({
        url: '/upload/testFinish',
        method: 'get',
        params:data
    })
}